#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

bool isPalindrome(char* s) {
    int len = strlen(s);
    int z = 0;
    char* ans = (char*)malloc(sizeof(char) * (len + 1));
    for (int i = 0; i < len; i++)
    {
        if (s[i] == ' ')
        {
            i++;
        }
        if (s[i] <= 'Z' && s[i] >= 'A')
        {
            ans[z++] = s[i] + 32;
        }
        if (s[i] <= 'z' && s[i] >= 'a')
        {
            ans[z++] = s[i];
        }
        if (s[i] >= '0' && s[i] <= '9')
        {
            ans[z++] = s[i];
        }
    }
    int left = 0;
    int right = z - 1;
    while (left < right)
    {
        if (ans[left] != ans[right])
        {
            return false;
        }
        left++;
        right--;
    }
    return true;
}

int main()
{
    char arr[] = { "0P" };
    isPalindrome(arr);
    return 0;
}